<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>
  Class: OpenTok::Archive
  
    &mdash; Documentation by YARD 0.8.7.6
  
</title>

  <link rel="stylesheet" href="../css/style.css" type="text/css" charset="utf-8" />

  <link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" />

<script type="text/javascript" charset="utf-8">
  hasFrames = window.top.frames.main ? true : false;
  relpath = '../';
  framesUrl = "../frames.html#!OpenTok/Archive.html";
</script>


  <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>

  <script type="text/javascript" charset="utf-8" src="../js/app.js"></script>


  </head>
  <body>
    <div id="header">
      <div id="menu">
  
    <a href="../_index.html">Index (A)</a> &raquo;
    <span class='title'><span class='object_link'><a href="../OpenTok.html" title="OpenTok (module)">OpenTok</a></span></span>
     &raquo; 
    <span class="title">Archive</span>
  

  <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
</div>

      <div id="search">
  
    <a class="full_list_link" id="class_list_link"
        href="../class_list.html">
      Class List
    </a>
  
    <a class="full_list_link" id="method_list_link"
        href="../method_list.html">
      Method List
    </a>
  
    <a class="full_list_link" id="file_list_link"
        href="../file_list.html">
      File List
    </a>
  
</div>
      <div class="clear"></div>
    </div>

    <iframe id="search_frame"></iframe>

    <div id="content"><h1>Class: OpenTok::Archive
  
  
  
</h1>

<dl class="box">
  
    <dt class="r1">Inherits:</dt>
    <dd class="r1">
      <span class="inheritName">Object</span>
      
        <ul class="fullTree">
          <li>Object</li>
          
            <li class="next">OpenTok::Archive</li>
          
        </ul>
        <a href="#" class="inheritanceTree">show all</a>
      
      </dd>
    
  
  
    
  
    
  
  
  
    <dt class="r2 last">Defined in:</dt>
    <dd class="r2 last">lib/opentok/archive.rb</dd>
  
</dl>
<div class="clear"></div>

<h2>Overview</h2><div class="docstring">
  <div class="discussion">
    
<p>Represents an archive of an OpenTok session.</p>


  </div>
</div>
<div class="tags">
  

</div>



  <h2>Instance Attribute Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2>
  <ul class="summary">
    
      <li class="public ">
  <span class="summary_signature">
    
      <a href="#created_at-instance_method" title="#created_at (instance method)">- (int) <strong>created_at</strong> </a>
    

    
  </span>
  
  
  
    
    
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'>
<p>The time at which the archive was created, in milliseconds since the UNIX
epoch.</p>
</div></span>
  
</li>

    
      <li class="public ">
  <span class="summary_signature">
    
      <a href="#duration-instance_method" title="#duration (instance method)">- (string) <strong>duration</strong> </a>
    

    
  </span>
  
  
  
    
    
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'>
<p>The duration of the archive, in milliseconds.</p>
</div></span>
  
</li>

    
      <li class="public ">
  <span class="summary_signature">
    
      <a href="#has_audio-instance_method" title="#has_audio (instance method)">- (true, false) <strong>has_audio</strong> </a>
    

    
  </span>
  
  
  
    
    
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'>
<p>Whether the archive has an audio track (true) or not (false).</p>
</div></span>
  
</li>

    
      <li class="public ">
  <span class="summary_signature">
    
      <a href="#has_video-instance_method" title="#has_video (instance method)">- (true, false) <strong>has_video</strong> </a>
    

    
  </span>
  
  
  
    
    
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'>
<p>Whether the archive has a video track (true) or not (false).</p>
</div></span>
  
</li>

    
      <li class="public ">
  <span class="summary_signature">
    
      <a href="#id-instance_method" title="#id (instance method)">- (string) <strong>id</strong> </a>
    

    
  </span>
  
  
  
    
    
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'>
<p>The archive ID.</p>
</div></span>
  
</li>

    
      <li class="public ">
  <span class="summary_signature">
    
      <a href="#name-instance_method" title="#name (instance method)">- (string) <strong>name</strong> </a>
    

    
  </span>
  
  
  
    
    
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'>
<p>The name of the archive.</p>
</div></span>
  
</li>

    
      <li class="public ">
  <span class="summary_signature">
    
      <a href="#output_mode-instance_method" title="#output_mode (instance method)">- (String) <strong>output_mode</strong> </a>
    

    
  </span>
  
  
  
    
    
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'>
<p>Whether all streams in the archive are recorded to a single file
(:composed) or to individual files (:individual).</p>
</div></span>
  
</li>

    
      <li class="public ">
  <span class="summary_signature">
    
      <a href="#partner_id-instance_method" title="#partner_id (instance method)">- (string) <strong>partner_id</strong> </a>
    

    
  </span>
  
  
  
    
    
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'>
<p>The API key associated with the archive.</p>
</div></span>
  
</li>

    
      <li class="public ">
  <span class="summary_signature">
    
      <a href="#reason-instance_method" title="#reason (instance method)">- (string) <strong>reason</strong> </a>
    

    
  </span>
  
  
  
    
    
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'>
<p>For archives with the status "stopped", this can be set to "90 mins
exceeded", "failure", "session ended", or "user initiated".</p>
</div></span>
  
</li>

    
      <li class="public ">
  <span class="summary_signature">
    
      <a href="#session_id-instance_method" title="#session_id (instance method)">- (string) <strong>session_id</strong> </a>
    

    
  </span>
  
  
  
    
    
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'>
<p>The session ID of the OpenTok session associated with this archive.</p>
</div></span>
  
</li>

    
      <li class="public ">
  <span class="summary_signature">
    
      <a href="#size-instance_method" title="#size (instance method)">- (float) <strong>size</strong> </a>
    

    
  </span>
  
  
  
    
    
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'>
<p>The size of the MP4 file.</p>
</div></span>
  
</li>

    
      <li class="public ">
  <span class="summary_signature">
    
      <a href="#status-instance_method" title="#status (instance method)">- (string) <strong>status</strong> </a>
    

    
  </span>
  
  
  
    
    
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'>
<p>The status of the archive, which can be one of the following:.</p>
</div></span>
  
</li>

    
      <li class="public ">
  <span class="summary_signature">
    
      <a href="#url-instance_method" title="#url (instance method)">- (string) <strong>url</strong> </a>
    

    
  </span>
  
  
  
    
    
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'>
<p>The download URL of the available MP4 file.</p>
</div></span>
  
</li>

    
  </ul>




  
    <h2>
      Instance Method Summary
      <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
    </h2>

    <ul class="summary">
      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#delete-instance_method" title="#delete (instance method)">- (Object) <strong>delete</strong> </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'>
<p>Deletes an OpenTok archive.</p>
</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#stop-instance_method" title="#stop (instance method)">- (Object) <strong>stop</strong> </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'>
<p>Stops an OpenTok archive that is being recorded.</p>
</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#to_json-instance_method" title="#to_json (instance method)">- (Object) <strong>to_json</strong> </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'>
<p>A JSON encoded string representation of the archive.</p>
</div></span>
  
</li>

      
    </ul>
  

<div id="method_missing_details" class="method_details_list">
  <h2>Dynamic Method Handling</h2>
  <p class="notice this">
    This class handles dynamic methods through the <tt>method_missing</tt> method
    
  </p>
  
    <div class="method_details first">
  <h3 class="signature first" id="method_missing-instance_method">
  
    - (<tt>Object</tt>) <strong>method_missing</strong>(method, *args, &amp;block) 
  

  

  
</h3><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


100
101
102
103
104
105
106
107
108
109
110
111
112</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/opentok/archive.rb', line 100</span>

<span class='kw'>def</span> <span class='id identifier rubyid_method_missing'>method_missing</span><span class='lparen'>(</span><span class='id identifier rubyid_method'>method</span><span class='comma'>,</span> <span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='comma'>,</span> <span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
  <span class='id identifier rubyid_camelized_method'>camelized_method</span> <span class='op'>=</span> <span class='id identifier rubyid_method'>method</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='period'>.</span><span class='id identifier rubyid_camelize'>camelize</span><span class='lparen'>(</span><span class='symbol'>:lower</span><span class='rparen'>)</span>
  <span class='kw'>if</span> <span class='ivar'>@json</span><span class='period'>.</span><span class='id identifier rubyid_has_key?'>has_key?</span> <span class='id identifier rubyid_camelized_method'>camelized_method</span> <span class='kw'>and</span> <span class='id identifier rubyid_args'>args</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span>
    <span class='comment'># TODO: convert create_time method call to a Time object
</span>    <span class='kw'>if</span> <span class='id identifier rubyid_camelized_method'>camelized_method</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>outputMode</span><span class='tstring_end'>'</span></span>
      <span class='ivar'>@json</span><span class='lbracket'>[</span><span class='id identifier rubyid_camelized_method'>camelized_method</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_to_sym'>to_sym</span>
    <span class='kw'>else</span>
      <span class='ivar'>@json</span><span class='lbracket'>[</span><span class='id identifier rubyid_camelized_method'>camelized_method</span><span class='rbracket'>]</span>
    <span class='kw'>end</span>
  <span class='kw'>else</span>
    <span class='kw'>super</span> <span class='id identifier rubyid_method'>method</span><span class='comma'>,</span> <span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='comma'>,</span> <span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span>
  <span class='kw'>end</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
  
</div>

  <div id="instance_attr_details" class="attr_details">
    <h2>Instance Attribute Details</h2>
    
      
      <span id="created_at=-instance_method"></span>
      <div class="method_details first">
  <h3 class="signature first" id="created_at-instance_method">
  
    - (<tt>int</tt>) <strong>created_at</strong> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    
<p>The time at which the archive was created, in milliseconds since the UNIX
epoch.</p>


  </div>
</div>
<div class="tags">
  
<p class="tag_title">Returns:</p>
<ul class="return">
  
    <li>
      
      
        <span class='type'>(<tt>int</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'>
<p>the current value of created_at</p>
</div>
      
    </li>
  
</ul>

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


66
67
68</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/opentok/archive.rb', line 66</span>

<span class='kw'>def</span> <span class='id identifier rubyid_created_at'>created_at</span>
  <span class='ivar'>@created_at</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      
      <span id="duration=-instance_method"></span>
      <div class="method_details ">
  <h3 class="signature " id="duration-instance_method">
  
    - (<tt>string</tt>) <strong>duration</strong> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    
<p>The duration of the archive, in milliseconds.</p>


  </div>
</div>
<div class="tags">
  
<p class="tag_title">Returns:</p>
<ul class="return">
  
    <li>
      
      
        <span class='type'>(<tt>string</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'>
<p>the current value of duration</p>
</div>
      
    </li>
  
</ul>

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


66
67
68</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/opentok/archive.rb', line 66</span>

<span class='kw'>def</span> <span class='id identifier rubyid_duration'>duration</span>
  <span class='ivar'>@duration</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      
      <span id="has_audio=-instance_method"></span>
      <div class="method_details ">
  <h3 class="signature " id="has_audio-instance_method">
  
    - (<tt>true</tt>, <tt>false</tt>) <strong>has_audio</strong> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    
<p>Whether the archive has an audio track (true) or not (false).</p>


  </div>
</div>
<div class="tags">
  
<p class="tag_title">Returns:</p>
<ul class="return">
  
    <li>
      
      
        <span class='type'>(<tt>true</tt>, <tt>false</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'>
<p>the current value of has_audio</p>
</div>
      
    </li>
  
</ul>

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


66
67
68</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/opentok/archive.rb', line 66</span>

<span class='kw'>def</span> <span class='id identifier rubyid_has_audio'>has_audio</span>
  <span class='ivar'>@has_audio</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      
      <span id="has_video=-instance_method"></span>
      <div class="method_details ">
  <h3 class="signature " id="has_video-instance_method">
  
    - (<tt>true</tt>, <tt>false</tt>) <strong>has_video</strong> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    
<p>Whether the archive has a video track (true) or not (false).</p>


  </div>
</div>
<div class="tags">
  
<p class="tag_title">Returns:</p>
<ul class="return">
  
    <li>
      
      
        <span class='type'>(<tt>true</tt>, <tt>false</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'>
<p>the current value of has_video</p>
</div>
      
    </li>
  
</ul>

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


66
67
68</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/opentok/archive.rb', line 66</span>

<span class='kw'>def</span> <span class='id identifier rubyid_has_video'>has_video</span>
  <span class='ivar'>@has_video</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      
      <span id="id=-instance_method"></span>
      <div class="method_details ">
  <h3 class="signature " id="id-instance_method">
  
    - (<tt>string</tt>) <strong>id</strong> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    
<p>The archive ID.</p>


  </div>
</div>
<div class="tags">
  
<p class="tag_title">Returns:</p>
<ul class="return">
  
    <li>
      
      
        <span class='type'>(<tt>string</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'>
<p>the current value of id</p>
</div>
      
    </li>
  
</ul>

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


66
67
68</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/opentok/archive.rb', line 66</span>

<span class='kw'>def</span> <span class='id identifier rubyid_id'>id</span>
  <span class='ivar'>@id</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      
      <span id="name=-instance_method"></span>
      <div class="method_details ">
  <h3 class="signature " id="name-instance_method">
  
    - (<tt>string</tt>) <strong>name</strong> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    
<p>The name of the archive. If no name was provided when the archive was
created, this is set to null.</p>


  </div>
</div>
<div class="tags">
  
<p class="tag_title">Returns:</p>
<ul class="return">
  
    <li>
      
      
        <span class='type'>(<tt>string</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'>
<p>the current value of name</p>
</div>
      
    </li>
  
</ul>

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


66
67
68</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/opentok/archive.rb', line 66</span>

<span class='kw'>def</span> <span class='id identifier rubyid_name'>name</span>
  <span class='ivar'>@name</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      
      <span id="output_mode=-instance_method"></span>
      <div class="method_details ">
  <h3 class="signature " id="output_mode-instance_method">
  
    - (<tt>String</tt>) <strong>output_mode</strong> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    
<p>Whether all streams in the archive are recorded to a single file
(<tt>:composed</tt>) or to individual files (<tt>:individual</tt>).</p>


  </div>
</div>
<div class="tags">
  
<p class="tag_title">Returns:</p>
<ul class="return">
  
    <li>
      
      
        <span class='type'>(<tt>String</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'>
<p>the current value of output_mode</p>
</div>
      
    </li>
  
</ul>

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


66
67
68</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/opentok/archive.rb', line 66</span>

<span class='kw'>def</span> <span class='id identifier rubyid_output_mode'>output_mode</span>
  <span class='ivar'>@output_mode</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      
      <span id="partner_id=-instance_method"></span>
      <div class="method_details ">
  <h3 class="signature " id="partner_id-instance_method">
  
    - (<tt>string</tt>) <strong>partner_id</strong> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    
<p>The API key associated with the archive.</p>


  </div>
</div>
<div class="tags">
  
<p class="tag_title">Returns:</p>
<ul class="return">
  
    <li>
      
      
        <span class='type'>(<tt>string</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'>
<p>the current value of partner_id</p>
</div>
      
    </li>
  
</ul>

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


66
67
68</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/opentok/archive.rb', line 66</span>

<span class='kw'>def</span> <span class='id identifier rubyid_partner_id'>partner_id</span>
  <span class='ivar'>@partner_id</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      
      <span id="reason=-instance_method"></span>
      <div class="method_details ">
  <h3 class="signature " id="reason-instance_method">
  
    - (<tt>string</tt>) <strong>reason</strong> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    
<p>For archives with the status "stopped", this can be set to "90 mins
exceeded", "failure", "session ended", or "user initiated". For archives
with the status "failed", this can be set to "system failure".</p>


  </div>
</div>
<div class="tags">
  
<p class="tag_title">Returns:</p>
<ul class="return">
  
    <li>
      
      
        <span class='type'>(<tt>string</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'>
<p>the current value of reason</p>
</div>
      
    </li>
  
</ul>

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


66
67
68</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/opentok/archive.rb', line 66</span>

<span class='kw'>def</span> <span class='id identifier rubyid_reason'>reason</span>
  <span class='ivar'>@reason</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      
      <span id="session_id=-instance_method"></span>
      <div class="method_details ">
  <h3 class="signature " id="session_id-instance_method">
  
    - (<tt>string</tt>) <strong>session_id</strong> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    
<p>The session ID of the OpenTok session associated with this archive.</p>


  </div>
</div>
<div class="tags">
  
<p class="tag_title">Returns:</p>
<ul class="return">
  
    <li>
      
      
        <span class='type'>(<tt>string</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'>
<p>the current value of session_id</p>
</div>
      
    </li>
  
</ul>

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


66
67
68</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/opentok/archive.rb', line 66</span>

<span class='kw'>def</span> <span class='id identifier rubyid_session_id'>session_id</span>
  <span class='ivar'>@session_id</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      
      <span id="size=-instance_method"></span>
      <div class="method_details ">
  <h3 class="signature " id="size-instance_method">
  
    - (<tt>float</tt>) <strong>size</strong> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    
<p>The size of the MP4 file. For archives that have not been generated, this
value is set to 0.</p>


  </div>
</div>
<div class="tags">
  
<p class="tag_title">Returns:</p>
<ul class="return">
  
    <li>
      
      
        <span class='type'>(<tt>float</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'>
<p>the current value of size</p>
</div>
      
    </li>
  
</ul>

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


66
67
68</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/opentok/archive.rb', line 66</span>

<span class='kw'>def</span> <span class='id identifier rubyid_size'>size</span>
  <span class='ivar'>@size</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      
      <span id="status=-instance_method"></span>
      <div class="method_details ">
  <h3 class="signature " id="status-instance_method">
  
    - (<tt>string</tt>) <strong>status</strong> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    
<p>The status of the archive, which can be one of the following:</p>
<ul><li>
<p>"available" -- The archive is available for download from the OpenTok
cloud.</p>
</li><li>
<p>"expired" -- The archive is no longer available for download from the
OpenTok cloud.</p>
</li><li>
<p>"failed" -- The archive recording failed.</p>
</li><li>
<p>"paused" -- The archive is in progress and no clients are publishing
streams to the session. When an archive is in progress and any client
publishes a stream, the status is "started". When an archive is paused,
nothing is recorded. When a client starts publishing a stream, the
recording starts (or resumes). If all clients disconnect from a session
that is being archived, the status changes to "paused", and after 60
seconds the archive recording stops (and the status changes to "stopped").</p>
</li><li>
<p>"started" -- The archive started and is in the process of being recorded.</p>
</li><li>
<p>"stopped" -- The archive stopped recording.</p>
</li><li>
<p>"uploaded" -- The archive is available for download from the the upload
target Amazon S3 bucket or Windows Azure container you set at the OpenTok
dashboard (<a
href="https://dashboard.tokbox.com">dashboard.tokbox.com</a>).</p>
</li></ul>


  </div>
</div>
<div class="tags">
  
<p class="tag_title">Returns:</p>
<ul class="return">
  
    <li>
      
      
        <span class='type'>(<tt>string</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'>
<p>the current value of status</p>
</div>
      
    </li>
  
</ul>

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


66
67
68</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/opentok/archive.rb', line 66</span>

<span class='kw'>def</span> <span class='id identifier rubyid_status'>status</span>
  <span class='ivar'>@status</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      
      <span id="url=-instance_method"></span>
      <div class="method_details ">
  <h3 class="signature " id="url-instance_method">
  
    - (<tt>string</tt>) <strong>url</strong> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    
<p>The download URL of the available MP4 file. This is only set for an archive
with the status set to "available"; for other archives, (including archives
with the status "uploaded") this property is set to null. The download URL
is obfuscated, and the file is only available from the URL for 10 minutes.
To generate a new URL, call the Archive.listArchives() or
OpenTok.getArchive() method.</p>


  </div>
</div>
<div class="tags">
  
<p class="tag_title">Returns:</p>
<ul class="return">
  
    <li>
      
      
        <span class='type'>(<tt>string</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'>
<p>the current value of url</p>
</div>
      
    </li>
  
</ul>

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


66
67
68</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/opentok/archive.rb', line 66</span>

<span class='kw'>def</span> <span class='id identifier rubyid_url'>url</span>
  <span class='ivar'>@url</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
  </div>


  <div id="instance_method_details" class="method_details_list">
    <h2>Instance Method Details</h2>

    
      <div class="method_details first">
  <h3 class="signature first" id="delete-instance_method">
  
    - (<tt>Object</tt>) <strong>delete</strong> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    
<p>Deletes an OpenTok archive.</p>

<p>You can only delete an archive which has a status of "available" or
"uploaded". Deleting an archive removes its record from the list of
archives. For an "available" archive, it also removes the archive file,
making it unavailable for download.</p>


  </div>
</div>
<div class="tags">
  

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


94
95
96
97</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/opentok/archive.rb', line 94</span>

<span class='kw'>def</span> <span class='id identifier rubyid_delete'>delete</span>
  <span class='comment'># TODO: validate returned json fits schema
</span>  <span class='ivar'>@json</span> <span class='op'>=</span> <span class='ivar'>@interface</span><span class='period'>.</span><span class='id identifier rubyid_delete_by_id'>delete_by_id</span> <span class='ivar'>@json</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>id</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="stop-instance_method">
  
    - (<tt>Object</tt>) <strong>stop</strong> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    
<p>Stops an OpenTok archive that is being recorded.</p>

<p>Archives automatically stop recording after 90 minutes or when all clients
have disconnected from the session being archived.</p>


  </div>
</div>
<div class="tags">
  

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


84
85
86
87</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/opentok/archive.rb', line 84</span>

<span class='kw'>def</span> <span class='id identifier rubyid_stop'>stop</span>
  <span class='comment'># TODO: validate returned json fits schema
</span>  <span class='ivar'>@json</span> <span class='op'>=</span> <span class='ivar'>@interface</span><span class='period'>.</span><span class='id identifier rubyid_stop_by_id'>stop_by_id</span> <span class='ivar'>@json</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>id</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="to_json-instance_method">
  
    - (<tt>Object</tt>) <strong>to_json</strong> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    
<p>A JSON encoded string representation of the archive</p>


  </div>
</div>
<div class="tags">
  

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


76
77
78</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/opentok/archive.rb', line 76</span>

<span class='kw'>def</span> <span class='id identifier rubyid_to_json'>to_json</span>
  <span class='ivar'>@json</span><span class='period'>.</span><span class='id identifier rubyid_to_json'>to_json</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
  </div>

</div>

    <div id="footer">
  Generated on Mon May 25 15:52:46 2015 by
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
  0.8.7.6 (ruby-1.9.3).
</div>

  </body>
</html>